#include "state_machine.hpp"

namespace fsm
{
	namespace sc = boost::statechart;

	sc::result StWork::react(const EvTick&)
	{
		printf("StWork state\n");
		return discard_event();
	}

	sc::result StWork::react(const EvSearchEnd& ev)
	{
		monstrer_id_ = ev.monster_id_;
		post_event(EvMoveTo(100, 100));
		return transit<StMove>();
	}

	sc::result StWork::react(const EvMoveEnd& ev)
	{
		post_event(EvAttack(monstrer_id_));
		return transit<StAttack>();
	}

}//names